package com.muyu.danmo.service.impl;


import com.muyu.danmo.domain.DanmoArtSchool;
import com.muyu.danmo.mapper.DanmoArtSchoolMapper;
import com.muyu.danmo.service.IDanmoArtSchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 办学类型Service业务层处理
 *
 * @author yangle
 * @date 2024-10-31
 */
@Service
public class DanmoArtSchoolServiceImpl implements IDanmoArtSchoolService
{
    @Autowired
    private DanmoArtSchoolMapper danmoArtSchoolMapper;

    /**
     * 查询办学类型
     *
     * @param id 办学类型主键
     * @return 办学类型
     */
    @Override
    public DanmoArtSchool selectDanmoArtSchoolById(Long id)
    {
        return danmoArtSchoolMapper.selectDanmoArtSchoolById(id);
    }

    /**
     * 查询办学类型列表
     *
     * @param danmoArtSchool 办学类型
     * @return 办学类型
     */
    @Override
    public List<DanmoArtSchool> selectDanmoArtSchoolList(DanmoArtSchool danmoArtSchool)
    {
        return danmoArtSchoolMapper.selectDanmoArtSchoolList(danmoArtSchool);
    }

    /**
     * 新增办学类型
     *
     * @param danmoArtSchool 办学类型
     * @return 结果
     */
    @Override
    public int insertDanmoArtSchool(DanmoArtSchool danmoArtSchool)
    {
        return danmoArtSchoolMapper.insertDanmoArtSchool(danmoArtSchool);
    }

    /**
     * 修改办学类型
     *
     * @param danmoArtSchool 办学类型
     * @return 结果
     */
    @Override
    public int updateDanmoArtSchool(DanmoArtSchool danmoArtSchool)
    {
        return danmoArtSchoolMapper.updateDanmoArtSchool(danmoArtSchool);
    }

    /**
     * 批量删除办学类型
     *
     * @param ids 需要删除的办学类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoArtSchoolByIds(Long[] ids)
    {
        return danmoArtSchoolMapper.deleteDanmoArtSchoolByIds(ids);
    }

    /**
     * 删除办学类型信息
     *
     * @param id 办学类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoArtSchoolById(Long id)
    {
        return danmoArtSchoolMapper.deleteDanmoArtSchoolById(id);
    }
}
